package com.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.domain.Dept;

import com.crm.dto.Vo.DeptTreeVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.util.List;

@Mapper
public interface DeptMapper extends BaseMapper<Dept> {
@Select("select * from dept")
    List<Dept> selectAll();
    @Delete("delete from dept where dept_id = #{id}")
    void deleteId(Long id);
    @Select("select * from dept where dept_id = #{id}")
    Dept selectByIds(Long id);

    List<DeptTreeVo> treeSelect();
}
